import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
testCase="DBshop042_搜索提现申请"

firefox=openBrowser(url)
DBshopLogin(firefox,userName,password)
firefox.find_element_by_link_text("用户中心").click()
firefox.find_element_by_link_text("账户余额").click()
firefox.find_element_by_link_text("提现").click()
time.sleep(3)
firefox.find_element_by_id("money_change_num").send_keys("10000")
firefox.find_element_by_id("bank_name").send_keys("支付宝")
firefox.find_element_by_id("bank_account").send_keys("支付宝")
firefox.find_element_by_id("bank_card_number").send_keys("10086")
firefox.find_element_by_xpath("//button[text()='申请提现']").click()
time.sleep(4)

firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"客户管理","客户余额","提现申请")
firefox.find_element_by_name("user_name").send_keys("kunkun")
firefox.find_element_by_xpath("//button").click()


try:
    firefox.find_element_by_xpath("//td[text()='kunkun']")
    writeLog("%s 测试通过" % testCase)

except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)


